package org.dtrd.modules.doctor.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.doctor.entity.po.DtrdEntRdPatientSigninSugarValue;
import java.util.Date;

/**
 * <p>
 * 血糖记录表
 * </p>
 *
 * @author 5146
 * @since 2022-04-14
 */
@Getter
@Setter
@ApiModel(value = "血糖记录表详情")
public class SigninSugarValueDetail {

    private Integer dataId;

    private Integer patientId;

    private Date recordDate;

    private Date recordTime;

    @ApiModelProperty("照片以 竖线 | 拼接")
    private String recordPhoto;

    @ApiModelProperty("1-早餐前,2-早餐后,3-午餐前,4-午餐后,5-晚餐前,6-晚餐后,7-睡前,8-凌晨")
    private Integer sugarValueTimeTypeId;

    @ApiModelProperty("血糖值")
    private Float sugarValueSugarValue;

    private String sugarValueRemark;

    @ApiModelProperty("0-客户端,9-微信,10-瞬感蓝牙版,11-瞬感移动版,12-小糖医,13-爱奥乐,14-小程序")
    private Integer sugarValueSourceType;

    @ApiModelProperty("血糖值测量 0-未知,1-偏高,2-正常,3-偏低")
    private Integer sugarValueType;

    @ApiModelProperty("瞬感设备IMEI")
    private String sugarValuesShunganImei;

    @ApiModelProperty("小糖医IMEI")
    private String sugarValuesXtyImei;

    @ApiModelProperty("记录类型, 0-打卡, 1-建档")
    private Integer sugarValueRecordArchiveTag;



    public SigninSugarValueDetail parseFromPo(DtrdEntRdPatientSigninSugarValue po) {
        dataId = po.getDataId();
        patientId = po.getPatientId();
        recordDate = po.getRecordDate();
        recordTime = po.getRecordTime();
        recordPhoto = po.getRecordPhoto();
        sugarValueTimeTypeId = po.getSugarValueTimeTypeId();
        sugarValueSugarValue = po.getSugarValueSugarValue();
        sugarValueRemark = po.getSugarValueRemark();
        sugarValueSourceType = po.getSugarValueSourceType();
        sugarValueType = po.getSugarValueType();
        sugarValuesShunganImei = po.getSugarValuesShunganImei();
        sugarValuesXtyImei = po.getSugarValuesXtyImei();
        sugarValueRecordArchiveTag = po.getSugarValueRecordArchiveTag();
        return this;
    }
}
